import { defHttp } from '/@/utils/http/axios';
import { ContentTypeEnum } from '/@/enums/httpEnum';

enum Api {
  getinfomationList = '/admin-api/system/information/page',
  getinfomation = '/admin-api/system/information/get',
  getinfomationAdd = '/admin-api/system/information/create',
  getinfomationEdit = '/admin-api/system/information/update',
  getinfomationDelete = '/admin-api/system/information/delete',
}

/**
 * @description: 获用户
 */
export const infomationList = (params: any) => {
  return defHttp.get<any>({ url: Api.getinfomationList, params });
};
export const infomationGet = (params: any) => {
  return defHttp.get<any>({ url: Api.getinfomation, params });
};
export const addinfomation = (params: any) => {
  return defHttp.post<any>({ url: Api.getinfomationAdd, params });
};
export const editinfomation = (params: any) => {
  return defHttp.put<any>({ url: Api.getinfomationEdit, params });
};
export const deleteinfomation = (params: any) => {
  return defHttp.delete<any>({
    url: Api.getinfomationDelete,
    params,
    headers: { 'Content-Type': ContentTypeEnum.FORM_URLENCODED },
  });
};
